Skip to content

🧹 Remove dead code functions across multiple packages#18812

Merged
dsyme merged 1 commit intomainfrom
dead5
Feb 28, 2026
Merged

🧹 Remove dead code functions across multiple packages#18812
dsyme merged 1 commit intomainfrom
dead5

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Feb 28, 2026

Summary

  • Removes unused functions from permissions_factory.go, frontmatter_types.go, safe_output_parser.go, and js.go
  • Updates DEADCODE.md with a structured multi-batch removal plan (batches 5–16) and correct methodology for handling test-only callers
  • Clarifies that functions called only in test files are still considered dead in the production binary and should be deleted along with their tests

Copilot AI review requested due to automatic review settings February 28, 2026 10:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes dead/unused Go helper functions across the workflow package and updates the dead-code removal guide to document the correct process and a batch-by-batch plan for future cleanups.

Changes:

  • Deleted unused parser/config helper functions in pkg/workflow/safe_output_parser.go and frontmatter extraction wrappers in pkg/workflow/frontmatter_types.go.
  • Removed unused permission factory constructors in pkg/workflow/permissions_factory.go and a dead JS getter stub in pkg/workflow/js.go.
  • Expanded and corrected DEADCODE.md with methodology, pitfalls, and a structured batch plan/checklist.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pkg/workflow/safe_output_parser.go Removes unused exported parsing helpers for discussion/close/list configs.
pkg/workflow/permissions_factory.go Removes unused permission-constructor helpers.
pkg/workflow/js.go Removes an unused internal JS getter stub.
pkg/workflow/frontmatter_types.go Removes unused convenience wrappers for string/int extraction.
DEADCODE.md Adds correct methodology, pitfalls, and a detailed multi-batch removal plan/checklist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dsyme dsyme merged commit 996ab96 into main Feb 28, 2026
88 checks passed
@dsyme dsyme deleted the dead5 branch February 28, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants